<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<script type="text/javascript">
    $("#itemTableList").treeTable({expandLevel: 2});
</script>
<div class="panel-body">

                <%--<div class="pull-left">--%>
                    <%--<input id="btnSubmit"--%>
                           <%--onclick="addSubProject('rigthCenterDiv','${applyId}','${ctx}/treatProjectItem/treatProjectItem/formTreat?type=1&applyId=${applyId}')"--%>
                           <%--class="btn btn-primary" type="submit" value="添加"/>--%>
                    <%--<input onclick="addSubOrder('rigthCenterDiv','${ctx}/treatProjectItem/treatProjectItem/formTreat?type=1&applyId=${applyId}')"--%>
                           <%--class="btn btn-add" type="submit" value="子医嘱"/>--%>
                <%--</div>--%>
            <%--</div>--%>
            <table id="itemTableList" class="table table-bordered mg-t datatable">
                <thead>
                <tr>
                    <%--<th>治疗类型</th>--%>
                    <th>类别</th>
                    <th>长期/临时</th>
                    <th>计价属性</th>
                    <th>医嘱内容</th>
                    <th>频次</th>
                    <th>途径</th>
                    <th>单次剂量</th>
                    <th>单位</th>
                    <th>包装规格</th>
                    <%--<th>厂商</th>--%>
                    <%--<th>执行科室</th>--%>
                    <%--<th>开单科室</th>--%>
                    <%--<th>数量</th>--%>
                    <th>单价</th>
                    <th>护士执行时间</th>
                    <th>医生说明</th>
                        <th style="display:none"></th>
                </tr>
                </thead>
                <tbody>
                <c:forEach items="${treeList}" var="treatProjectItem">
                    <c:choose>
                        <c:when test="${!empty treatProjectItem.parent.id}">
                                <tr id='${treatProjectItem.id}' pId='${treatProjectItem.parent.id}'>
                        </c:when>
                            <c:otherwise>
                                 <tr id='${treatProjectItem.id}'>
                            </c:otherwise>
                        </c:choose>
                    <td><input type="hidden" value="${treatProjectItem.orderClass}">${fns:getDictLabels(treatProjectItem.orderClass,'BILL_ITEM_CLASS_DICT','')}</td>
                    <td><input type="hidden" value="${treatProjectItem.repeatIncaditor}"><c:if test="${treatProjectItem.repeatIncaditor == 0}">
                        临时
                    </c:if>
                        <c:if test="${treatProjectItem.repeatIncaditor == 1}">
                            长期
                        </c:if>
                    </td>
                    <td><input type="hidden" value="${treatProjectItem.billingAttr}">${fns:getDictLabels(treatProjectItem.billingAttr,'BILLING_ATTR','')}</td>
                    <td> ${treatProjectItem.orderText}</td>
                    <td><input type="hidden"
                               value="${treatProjectItem.performFreq}"> ${fns:findFreqDesc(treatProjectItem.performFreq, '')}
                    </td>
                    <td><input type="hidden"
                               value="${treatProjectItem.administration}"> ${fns:getSysDictLabel(treatProjectItem.administration, 'ADMINISTRATION_DICT', '')}
                    </td>
                    <td><input style="width:55px;" type="number" value="${treatProjectItem.singleDose}"></td>
                    <td><input type="hidden" value="${treatProjectItem.singleDoseUnit}">${treatProjectItem.singleDoseUnit}</td>
                    <td> ${treatProjectItem.packageSpec}</td>  <!-- 包装规格-->
                        <%--<td> ${treatProjectItem.firmId}</td>--%>
                        <%--<td> ${fns:getDeptName(treatProjectItem.performedBy,'')}</td>--%>
                        <%--<td> ${fns:getDeptName(treatProjectItem.newDept,'')}</td>--%>
                        <%--<td> ${treatProjectItem.amount}</td>--%>
                    <td> ${treatProjectItem.price}</td>
                    <td><input style="width:60px;" type="text" value="${treatProjectItem.nursePerformTime}"/></td>
                        <%--<td> ${treatProjectItem.sumPrice}</td>--%>
                    <td> ${treatProjectItem.doctInstruction}</td>
                    <td style="display:none">
                        <input type="hidden" value="${treatProjectItem.id}"/>
                        <input type="hidden" value="${treatProjectItem.parent.id}"/>
                        <input type="hidden" value="${treatProjectItem.clinicItemId}"/>
                        <input type="hidden" value="${treatProjectItem.performedBy}"/>
                        <input type="hidden" value="${treatProjectItem.minUnits}"/> <!--最小包装单位-->
                        <input type="hidden" value="${treatProjectItem.firmName}"/>
                        <input type="hidden" value="${treatProjectItem.firmId}"/>
                        <input type="hidden" value="${treatProjectItem.isDrug}"/>
                        <input type="hidden" value="${treatProjectItem.doseUnitsMetering}"/> <!--最小单位计量-->
                        <input type="hidden" value="${treatProjectItem.minSpec}"/><!--最小规格-->
                        <input type="hidden" value="${treatProjectItem.drugUnits}"/><!--包装单位-->
                    </td>
                </tr>
                </c:forEach>
            </table>
